#设置所需最小cmak版本
cmake_minimum_required(VERSION 3.10)
#设置项目名称
project(webcam)
#设置C++标准
set(CMAKE_CXX_STANDARD 11)
#跳过第三方库依赖
set(CMAKE_CXX_FLAGS "-Wl,--allow-shlib-undefined -fpermissive")
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--allow-shlib-undefined")
#include
find_package(OpenCV REQUIRED)
set(RKNN_API_PATH /home/cat/code/mppproject/ffmpeg-rknn-rtmp/rknpu2/RK356X)
set(RKNN_RT_LIB ${RKNN_API_PATH}/librknn_api/librknnrt.so)
set(RGA_PATH /home/cat/code/mppproject/ffmpeg-rknn-rtmp/rga/RK356X)
set(RGA_LIB ${RGA_PATH}/lib/librga.so)
include_directories(${CMAKE_SOURCE_DIR})
include_directories(${RKNN_API_PATH}/include)
include_directories(${RGA_PATH}/include)
#rknn_yolov5_main
add_executable(stream
stream.cpp
postprocess.cpp
yolo.cpp
)
target_link_libraries(stream
${OpenCV_LIBS}
${RKNN_RT_LIB}
${RGA_LIB}
-lavdevice
-lavformat
-lavutil
-lavcodec
-lswscale
)